package com.wym.charging.controller;


import com.wym.charging.common.Result;
import com.wym.charging.entity.ChargingOptions;
import com.wym.charging.service.ChargingOptionsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 充电选项(ChargingOptions)表控制层
 *
 * @author WangYimin
 * @since 2024-12-08 22:40:50
 */
@Tag(name = "充电选项")
@RestController
@RequestMapping("charging-options")
public class ChargingOptionsController {
    /**
     * 服务对象
     */
    @Autowired
    private ChargingOptionsService chargingOptionsService;

    @PostMapping("get-charging-options")
    @Operation(summary = "获取充电选项")
    public Result<List<ChargingOptions>> getChargingOptions() {
        List<ChargingOptions> chargingOptions = chargingOptionsService.list();
        return Result.success(chargingOptions);
    }
}

